package com.punai.config.service.impl;

import com.punai.config.service.VersionService;
import com.punai.config.sqlitedao.VersionRepository;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.HashMap;
import java.util.Map;

@Service
public class VersionServiceImpl implements VersionService {

    @Autowired
    private VersionRepository versionRepository;

    @Override
    public Map<String, Object> getVersion(String tableType) {
        Map<String,Object> map =new HashMap<String, Object>();
        Integer version = versionRepository.findVersion();
        if (version==null) {
            //map.put("error","需要查询的文件名无效!");
            map.put("error","需要无效!");
        }else{
            map.put("success",version);
        }
        return map;
    }
}
